﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="/mint-ui/lib/style.css">
</head>
<body>


    <div id="app">
        <mt-button type="primary" @click="execute('close')"> 关闭柜体 </mt-button>
        <mt-button type="primary" @click="execute('ventilate')"> 开始通风 </mt-button>
        <mt-button type="primary" @click="execute('stop')"> 执行停止 </mt-button>

    </div>
</body>
<!-- import Vue before Element -->
<script src="/vue/dist/vue.js"></script>
<!-- import JavaScript -->

<!-- 引入样式 -->

<script src="/mint-ui/lib/index.js"></script>
<script src="/axios/dist/axios.min.js"></script>
<script>
    new Vue({
    el: '#app',
    data: function() {
        return { visible: false }
    },
        methods: {
            execute(action){
                axios.get(action,{ 
                }).then(function(res){
                    console.log(JSON.stringify(res.data));
                }).catch(function (error) {
                    console.log(error);
                });
            },
            
        }
    })
</script>
</html>